package com.xingkeduo.pojo.enums;

import lombok.Getter;

/**
 * 状态转换
 */
@Getter
public enum OrderStatusQuery {

    ALL("all","ALL"),  //全部
    PAID("waiting","PAID"), //待服务
    TO_BE_COMMENT("comment","TO_BE_COMMENT"), //待评价
    SERVICE_DOWN("finish","SERVICE_DOWN"), //已完成
    REFUND_DONE("refund","REFUND_DONE");//已退款

    private String key;

    private String value;

    OrderStatusQuery(String key, String value) {
        this.key = key;
        this.value = value;
    }


    public static String getValue(String key){
        for (OrderStatusQuery s : OrderStatusQuery.values())
            if(s.key.equals(key)){
                return s.getValue();
            }
        return null;
    }

}
